package com.chenqi.model.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @description: 前端注册请求
 * @program: ardaicommunity
 * @author: ChenQi
 * @create: 2021-03-2021/3/8-08-42
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegisterDTO {

    @NotEmpty(message = "用户名不能为空")
    @Length(min = 5,max = 15,message = "用户名长度在5-15")
    private String username;
    @NotEmpty(message = "密码不能为空")
    @Length(min = 5,max = 15,message = "用户名长度在5-15")
    private String pass;
    @NotEmpty(message = "再次输入密码")
    @Length(min = 5,max = 15,message = "用户名长度在5-15")
    private String checkPass;
    @NotEmpty(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;


}
